3.2.74 \(\int \frac {\log ^2(c (d+e x^n)^p)}{x} \, dx\) [174]

Optimal. Leaf size=79 \[ \frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n}+\frac {2 p \log \left (c \left (d+e x^n\right )^p\right ) \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n}-\frac {2 p^2 \text {Li}_3\left (1+\frac {e x^n}{d}\right )}{n} \]

[Out]

ln(-e*x^n/d)*ln(c*(d+e*x^n)^p)^2/n+2*p*ln(c*(d+e*x^n)^p)*polylog(2,1+e*x^n/d)/n-2*p^2*polylog(3,1+e*x^n/d)/n

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {2504, 2443, 2481, 2421, 6724} \begin {gather*} \frac {2 p \text {PolyLog}\left (2,\frac {e x^n}{d}+1\right ) \log \left (c \left (d+e x^n\right )^p\right )}{n}-\frac {2 p^2 \text {PolyLog}\left (3,\frac {e x^n}{d}+1\right )}{n}+\frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e*x^n)^p]^2/x,x]

[Out]

(Log[-((e*x^n)/d)]*Log[c*(d + e*x^n)^p]^2)/n + (2*p*Log[c*(d + e*x^n)^p]*PolyLog[2, 1 + (e*x^n)/d])/n - (2*p^2
*PolyLog[3, 1 + (e*x^n)/d])/n

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2443

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((
f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])^p/g), x] - Dist[b*e*n*(p/g), Int[Log[(e*(f + g*x))/(e*f - d
*g)]*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2481

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(k*(x/d))^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + j*(x/e))^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\log ^2\left (c \left (d+e x^n\right )^p\right )}{x} \, dx &=\frac {\text {Subst}\left (\int \frac {\log ^2\left (c (d+e x)^p\right )}{x} \, dx,x,x^n\right )}{n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n}-\frac {(2 e p) \text {Subst}\left (\int \frac {\log \left (-\frac {e x}{d}\right ) \log \left (c (d+e x)^p\right )}{d+e x} \, dx,x,x^n\right )}{n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n}-\frac {(2 p) \text {Subst}\left (\int \frac {\log \left (c x^p\right ) \log \left (-\frac {e \left (-\frac {d}{e}+\frac {x}{e}\right )}{d}\right )}{x} \, dx,x,d+e x^n\right )}{n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n}+\frac {2 p \log \left (c \left (d+e x^n\right )^p\right ) \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n}-\frac {\left (2 p^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {x}{d}\right )}{x} \, dx,x,d+e x^n\right )}{n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (c \left (d+e x^n\right )^p\right )}{n}+\frac {2 p \log \left (c \left (d+e x^n\right )^p\right ) \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{n}-\frac {2 p^2 \text {Li}_3\left (1+\frac {e x^n}{d}\right )}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(164\) vs. \(2(79)=158\).
time = 0.05, size = 164, normalized size = 2.08 \begin {gather*} \log (x) \left (-p \log \left (d+e x^n\right )+\log \left (c \left (d+e x^n\right )^p\right )\right )^2+2 p \left (-p \log \left (d+e x^n\right )+\log \left (c \left (d+e x^n\right )^p\right )\right ) \left (\log (x) \left (\log \left (d+e x^n\right )-\log \left (1+\frac {e x^n}{d}\right )\right )-\frac {\text {Li}_2\left (-\frac {e x^n}{d}\right )}{n}\right )+\frac {p^2 \left (\log \left (-\frac {e x^n}{d}\right ) \log ^2\left (d+e x^n\right )+2 \log \left (d+e x^n\right ) \text {Li}_2\left (1+\frac {e x^n}{d}\right )-2 \text {Li}_3\left (1+\frac {e x^n}{d}\right )\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e*x^n)^p]^2/x,x]

[Out]

Log[x]*(-(p*Log[d + e*x^n]) + Log[c*(d + e*x^n)^p])^2 + 2*p*(-(p*Log[d + e*x^n]) + Log[c*(d + e*x^n)^p])*(Log[
x]*(Log[d + e*x^n] - Log[1 + (e*x^n)/d]) - PolyLog[2, -((e*x^n)/d)]/n) + (p^2*(Log[-((e*x^n)/d)]*Log[d + e*x^n
]^2 + 2*Log[d + e*x^n]*PolyLog[2, 1 + (e*x^n)/d] - 2*PolyLog[3, 1 + (e*x^n)/d]))/n

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 2.50, size = 1356, normalized size = 17.16

method result size
risch \(\text {Expression too large to display}\) \(1356\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e*x^n)^p)^2/x,x,method=_RETURNVERBOSE)

[Out]

-1/4*Pi^2*ln(x)*csgn(I*c*(d+e*x^n)^p)^6+2/n*ln((d+e*x^n)^p)*ln(d+e*x^n)*ln(-e*x^n/d)*p-2/n*ln(c)*ln(x^n)*ln((d
+e*x^n)/d)*p-1/4*Pi^2*ln(x)*csgn(I*c*(d+e*x^n)^p)^4*csgn(I*c)^2-I*ln(c)*Pi*ln(x)*csgn(I*c*(d+e*x^n)^p)^3-I/n*l
n((d+e*x^n)^p)*Pi*ln(x^n)*csgn(I*(d+e*x^n)^p)*csgn(I*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
5*csgn(I*c)-1/4*Pi^2*ln(x)*csgn(I*(d+e*x^n)^p)^2*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)^2+2/n*ln((d+e*x^n)^p)*ln(c)
*ln(x^n)-2/n*ln(c)*dilog((d+e*x^n)/d)*p+I/n*Pi*ln(x^n)*ln((d+e*x^n)/d)*p*csgn(I*c*(d+e*x^n)^p)^3+1/n*ln(d+e*x^
n)^2*ln(e*x^n)*p^2+1/n*ln(1-(d+e*x^n)/d)*ln(d+e*x^n)^2*p^2-2/n*ln(d+e*x^n)^2*ln(-e*x^n/d)*p^2+2/n*polylog(2,(d
+e*x^n)/d)*ln(d+e*x^n)*p^2-2/n*ln(d+e*x^n)*dilog(-e*x^n/d)*p^2+2/n*ln((d+e*x^n)^p)*dilog(-e*x^n/d)*p-I*ln(c)*P
i*ln(x)*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)-Pi^2*ln(x)*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^
p)^4*csgn(I*c)-I/n*Pi*dilog((d+e*x^n)/d)*p*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)+I/n*ln((d+e*x^n)^p)*Pi*ln(x^n)*cs
gn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2+1/n*ln((d+e*x^n)^p)^2*ln(e*x^n)-2/n*polylog(3,(d+e*x^n)/d)*p^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)^2/x,x, algorithm="maxima")

[Out]

log((d + e^(n*log(x) + 1))^p)^2*log(x) - integrate(-(d*log(c)^2 + e^(n*log(x) + 1)*log(c)^2 - 2*((n*p*e*log(x)
 - e*log(c))*x^n - d*log(c))*log((d + e^(n*log(x) + 1))^p))/(d*x + x*e^(n*log(x) + 1)), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)^2/x,x, algorithm="fricas")

[Out]

integral(log((x^n*e + d)^p*c)^2/x, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (c \left (d + e x^{n}\right )^{p} \right )}^{2}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e*x**n)**p)**2/x,x)

[Out]

Integral(log(c*(d + e*x**n)**p)**2/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)^2/x,x, algorithm="giac")

[Out]

integrate(log((x^n*e + d)^p*c)^2/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\ln \left (c\,{\left (d+e\,x^n\right )}^p\right )}^2}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e*x^n)^p)^2/x,x)

[Out]

int(log(c*(d + e*x^n)^p)^2/x, x)

________________________________________________________________________________________